<?php

namespace App\Http\Controllers;

use App\DegModel;
use Illuminate\Http\Request;

class DegController extends Controller{

    public function deg(){
        return view('deg');

    }
    public function deg_add(Request $request){
        $input=$request->input();
        unset($input['_token']);
        $ok=DegModel::create($input);
        return $ok?'قوشۇش مۇۋاپىقيەتلىك بولدى!':'قوشۇش مەغلۇپ بولدى!';
    }

    public function deg_table(){
        $uqur=DegModel::get();

        return view('deg_table',compact("uqur"));

    }




}
